package my.test.hencodertest;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.widget.TextView;

import my.test.hencodertest.view.Ruler;

public class RulerActivity extends AppCompatActivity {
    TextView textView;
    Ruler ruler;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_ruler);
        textView = findViewById(R.id.tvValue);
        ruler = findViewById(R.id.ruler);
        ruler.setValueChangedListener(new Ruler.OnValueChangedListener() {
            @Override
            public void onValueChanged(float newValue) {
                textView.setText(String.valueOf(newValue));
            }
        });
    }
}
